home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
mus
/
play
/
tracker_4_31.lzh
/
tracker
/
color.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-15
|
904b
|
52 lines
/* color.c
vi:ts=3 sw=3:
*/
/* $Id: color.c,v 1.4 1995/05/11 12:23:36 espie Exp espie $
* $Log: color.c,v $
* Revision 1.4 1995/05/11 12:23:36 espie
* *** empty log message ***
*
* Revision 1.3 1995/03/08 13:48:44 espie
* *** empty log message ***
*
* Revision 1.2 1995/03/06 23:36:05 espie
* Proper color patch.
*
* Revision 1.1 1995/03/02 13:52:25 espie
* Initial revision
*
*/
char *write_color(base, color)
char *base;
int color;
{
#ifdef __OS2__
// The first 7 colors are totally useless
if(color>0)
color = color % 8 + 8;
#endif
#ifdef AMIGA
#else
*base++ = '\033';
*base++ = '[';
#ifdef SCO_ANSI_COLOR
if (color == 0)
{
*base++ = 'x';
return base;
}
#endif
*base++ = '0' + color / 8;
*base++=';';
*base++='3';
if (color == 0) /* color == 0 means reset */
*base++ = '9';
else
*base++ = '0' + color % 8;
*base++ = 'm';
#endif
return base;
}